package com.cqie.teacherserver.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.cqie.teacherserver.service.ITeacherAwardsInfoService;
import com.cqie.teacherserver.service.ITeacherEducationReformInfoService;
import com.cqie.teacherserver.entity.vo.TeacherAwardsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;

@RestController
@Api(tags = "教师学期报告")
@RequestMapping("/teacher")
public class TeacherController {
    @Autowired
    private ITeacherAwardsInfoService teacherAwardsInfoService;

    @Autowired
    private ITeacherEducationReformInfoService iTeacherEducationReformInfoService;

    /**
     * @Author lzx
     * @apiNote 获取教师获奖信息
     * @param GH 工号
     */
    @ApiOperation("教师获奖信息")
    @GetMapping("/teacherAwardHandle/{GH}")
    public R<TeacherAwardsVO>  teacherAwardHandle(@PathVariable("GH")Serializable GH){
        return teacherAwardsInfoService.getAwardsByTeacher(GH);
    }
    /**
     * @apiNote 获取教师的科研信息
     * @return technicalNumber 科技论文数量,educationNumber 教改数量
     */
    @ApiOperation("教师科研信息")
    @GetMapping("/teacherTechnicalMsg/{GH}")
    public R<TeacherAwardsVO> teacherTechnicalHandle(@PathVariable("GH")Serializable GH)
    {
        return iTeacherEducationReformInfoService.getTeacherTechnicalMsg(GH);
    }
}
